3.3.97 \(\int (A+B \log (e (a+b x)^n (c+d x)^{-n})) \, dx\) [297]

Optimal. Leaf size=57 \[ A x-\frac {B (b c-a d) n \log (c+d x)}{b d}+\frac {B (a+b x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b} \]

[Out]

A*x-B*(-a*d+b*c)*n*ln(d*x+c)/b/d+B*(b*x+a)*ln(e*(b*x+a)^n/((d*x+c)^n))/b

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 57, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {2536, 31} \begin {gather*} \frac {B (a+b x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b}-\frac {B n (b c-a d) \log (c+d x)}{b d}+A x \end {gather*}

Antiderivative was successfully verified.

[In]

Int[A + B*Log[(e*(a + b*x)^n)/(c + d*x)^n],x]

[Out]

A*x - (B*(b*c - a*d)*n*Log[c + d*x])/(b*d) + (B*(a + b*x)*Log[(e*(a + b*x)^n)/(c + d*x)^n])/b

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 2536

Int[((A_.) + Log[(e_.)*((a_.) + (b_.)*(x_))^(n_.)*((c_.) + (d_.)*(x_))^(mn_)]*(B_.))^(p_.), x_Symbol] :> Simp[
(a + b*x)*((A + B*Log[e*((a + b*x)^n/(c + d*x)^n)])^p/b), x] - Dist[B*n*p*((b*c - a*d)/b), Int[(A + B*Log[e*((
a + b*x)^n/(c + d*x)^n)])^(p - 1)/(c + d*x), x], x] /; FreeQ[{a, b, c, d, e, A, B, n}, x] && EqQ[n + mn, 0] &&
 NeQ[b*c - a*d, 0] && IGtQ[p, 0]

Rubi steps

\begin {align*} \int \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx &=A x+B \int \log \left (e (a+b x)^n (c+d x)^{-n}\right ) \, dx\\ &=A x+\frac {B (a+b x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b}-\frac {(B (b c-a d) n) \int \frac {1}{c+d x} \, dx}{b}\\ &=A x-\frac {B (b c-a d) n \log (c+d x)}{b d}+\frac {B (a+b x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 57, normalized size = 1.00 \begin {gather*} A x-\frac {B (b c-a d) n \log (c+d x)}{b d}+\frac {B (a+b x) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{b} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[A + B*Log[(e*(a + b*x)^n)/(c + d*x)^n],x]

[Out]

A*x - (B*(b*c - a*d)*n*Log[c + d*x])/(b*d) + (B*(a + b*x)*Log[(e*(a + b*x)^n)/(c + d*x)^n])/b

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(122\) vs. \(2(57)=114\).
time = 0.18, size = 123, normalized size = 2.16

method result size
default \(A x +B \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) x -\frac {B n c \ln \left (d x +c \right ) a}{a d -c b}+\frac {B n \,c^{2} \ln \left (d x +c \right ) b}{\left (a d -c b \right ) d}+\frac {B n \,a^{2} \ln \left (b x +a \right ) d}{\left (a d -c b \right ) b}-\frac {B n a \ln \left (b x +a \right ) c}{a d -c b}\) \(123\)
risch \(A x -B x \ln \left (\left (d x +c \right )^{n}\right )-\frac {i B \pi x \mathrm {csgn}\left (i \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right )^{3}}{2}+\frac {i B \pi x \,\mathrm {csgn}\left (i \left (b x +a \right )^{n}\right ) \mathrm {csgn}\left (i \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right )^{2}}{2}+\frac {i B \pi x \,\mathrm {csgn}\left (i \left (d x +c \right )^{-n}\right ) \mathrm {csgn}\left (i \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right )^{2}}{2}+\frac {i B \pi x \,\mathrm {csgn}\left (i \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) \mathrm {csgn}\left (i e \left (d x +c \right )^{-n} \left (b x +a \right )^{n}\right )^{2}}{2}-\frac {i B \pi x \,\mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) \mathrm {csgn}\left (i e \left (d x +c \right )^{-n} \left (b x +a \right )^{n}\right )}{2}-\frac {i B \pi x \,\mathrm {csgn}\left (i \left (b x +a \right )^{n}\right ) \mathrm {csgn}\left (i \left (d x +c \right )^{-n}\right ) \mathrm {csgn}\left (i \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right )}{2}-\frac {i B \pi x \mathrm {csgn}\left (i e \left (d x +c \right )^{-n} \left (b x +a \right )^{n}\right )^{3}}{2}+\frac {i B \pi x \,\mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i e \left (d x +c \right )^{-n} \left (b x +a \right )^{n}\right )^{2}}{2}+B \ln \left (e \right ) x +B x \ln \left (\left (b x +a \right )^{n}\right )+\frac {B a n \ln \left (-b x -a \right )}{b}-\frac {B c n \ln \left (d x +c \right )}{d}\) \(385\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(A+B*ln(e*(b*x+a)^n/((d*x+c)^n)),x,method=_RETURNVERBOSE)

[Out]

A*x+B*ln(e*(b*x+a)^n/((d*x+c)^n))*x-B*n*c/(a*d-b*c)*ln(d*x+c)*a+B*n*c^2/(a*d-b*c)/d*ln(d*x+c)*b+B*n*a^2/(a*d-b
*c)/b*ln(b*x+a)*d-B*n*a/(a*d-b*c)*ln(b*x+a)*c

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 61, normalized size = 1.07 \begin {gather*} {\left (\frac {a n e \log \left (b x + a\right )}{b} - \frac {c n e \log \left (d x + c\right )}{d}\right )} B e^{\left (-1\right )} + B x \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + A x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(A+B*log(e*(b*x+a)^n/((d*x+c)^n)),x, algorithm="maxima")

[Out]

(a*n*e*log(b*x + a)/b - c*n*e*log(d*x + c)/d)*B*e^(-1) + B*x*log((b*x + a)^n*e/(d*x + c)^n) + A*x

________________________________________________________________________________________

Fricas [A]
time = 0.39, size = 54, normalized size = 0.95 \begin {gather*} \frac {{\left (A + B\right )} b d x + {\left (B b d n x + B a d n\right )} \log \left (b x + a\right ) - {\left (B b d n x + B b c n\right )} \log \left (d x + c\right )}{b d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(A+B*log(e*(b*x+a)^n/((d*x+c)^n)),x, algorithm="fricas")

[Out]

((A + B)*b*d*x + (B*b*d*n*x + B*a*d*n)*log(b*x + a) - (B*b*d*n*x + B*b*c*n)*log(d*x + c))/(b*d)

________________________________________________________________________________________

Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: HeuristicGCDFailed} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(A+B*ln(e*(b*x+a)**n/((d*x+c)**n)),x)

[Out]

Exception raised: HeuristicGCDFailed >> no luck

________________________________________________________________________________________

Giac [A]
time = 2.03, size = 55, normalized size = 0.96 \begin {gather*} {\left (n x \log \left (b x + a\right ) - n x \log \left (d x + c\right ) + \frac {a n \log \left (b x + a\right )}{b} - \frac {c n \log \left (-d x - c\right )}{d} + x\right )} B + A x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(A+B*log(e*(b*x+a)^n/((d*x+c)^n)),x, algorithm="giac")

[Out]

(n*x*log(b*x + a) - n*x*log(d*x + c) + a*n*log(b*x + a)/b - c*n*log(-d*x - c)/d + x)*B + A*x

________________________________________________________________________________________

Mupad [B]
time = 4.11, size = 53, normalized size = 0.93 \begin {gather*} A\,x+B\,x\,\ln \left (\frac {e\,{\left (a+b\,x\right )}^n}{{\left (c+d\,x\right )}^n}\right )+\frac {B\,a\,n\,\ln \left (a+b\,x\right )}{b}-\frac {B\,c\,n\,\ln \left (c+d\,x\right )}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(A + B*log((e*(a + b*x)^n)/(c + d*x)^n),x)

[Out]

A*x + B*x*log((e*(a + b*x)^n)/(c + d*x)^n) + (B*a*n*log(a + b*x))/b - (B*c*n*log(c + d*x))/d

________________________________________________________________________________________